package com.jindy.module.drawBill.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jindy.common.annotation.Excel;
import com.jindy.common.core.domain.BaseEntity;
import com.jindy.module.drawBillDetail.domain.DrawBillDetail;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 开票申请对象 sy_draw_bill_t
 * 
 * @author yu
 * @date 2023-05-17
 */
@Data
public class DrawBillVO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 流水单号 */
    @Excel(name = "流水单号")
    private String serialNum;

    /** 开票日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date billDate;

    /** 结算编号 */
    @Excel(name = "结算编号")
    private String settleNum;

    /** 项目名称 */
    @Excel(name = "项目名称")
    private String settleProjectName;

    /** 开票总金额 */
    @Excel(name = "开票总金额")
    private BigDecimal billTotalAmount;

    /** 可开票金额 */
    @Excel(name = "可开票金额")
    private BigDecimal ableBillAmount;

    /** 结算金额 */
    @Excel(name = "结算金额")
    private BigDecimal settleTotalAmount;

    /** 我方开票公司 */
    @Excel(name = "我方开票公司")
    private String billCompany;

    /** 发票类型 */
    @Excel(name = "发票类型")
    private String billType;

    /** 税率 */
    @Excel(name = "税率")
    private String taxRate;

    /** 对方单位 */
    @Excel(name = "对方单位")
    private String company;

    /** 地址及电话 */
    @Excel(name = "地址及电话")
    private String adressPhone;

    /** 开户行、账户 */
    @Excel(name = "开户行、账户")
    private String openBankAccount;

    /** 开票信息附件 */
    @Excel(name = "开票信息附件")
    private String billAttached;

    /** 发票栏备注 */
    @Excel(name = "发票栏备注")
    private String billNote;

    /** 收件人 */
    @Excel(name = "收件人")
    private String receiver;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String receiverPhone;

    /** 收件地址 */
    @Excel(name = "收件地址")
    private String receiverAddress;

    /** 收件信息附件 */
    @Excel(name = "收件信息附件")
    private String receiverAttached;

    /** 申请人id */
    @Excel(name = "申请人id")
    private String applyUserId;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserName;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /**
     * 开票明细
     */
    private List<DrawBillDetail> drawBillDetailList;

    /**
     * 业务状态
     */
    private String businessStatus;


    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("serialNum", serialNum)
                .append("billDate", billDate)
                .append("settleNum", settleNum)
                .append("settleProjectName", settleProjectName)
                .append("billTotalAmount", billTotalAmount)
                .append("ableBillAmount", ableBillAmount)
                .append("settleTotalAmount", settleTotalAmount)
                .append("billCompany", billCompany)
                .append("billType", billType)
                .append("taxRate", taxRate)
                .append("company", company)
                .append("adressPhone", adressPhone)
                .append("openBankAccount", openBankAccount)
                .append("billAttached", billAttached)
                .append("billNote", billNote)
                .append("receiver", receiver)
                .append("receiverPhone", receiverPhone)
                .append("receiverAddress", receiverAddress)
                .append("receiverAttached", receiverAttached)
                .append("applyUserId", applyUserId)
                .append("applyUserName", applyUserName)
                .append("delFlag", delFlag)
                .append("drawBillDetailList", drawBillDetailList)
                .toString();
    }
}
